<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
<html>
<head>
    <title>购物订单列表</title>
    <meta name="decorator" content="default"/>
    <script type="text/javascript">
        function page(n, s) {
            $("#pageNo").val(n);
            $("#pageSize").val(s);
            $("#searchForm").attr("action", "${ctx}/sys/orderProduct/reserveProduct");
            $("#searchForm").submit();
            return false;
        }
    </script>
</head>
<body>
<ul class="nav nav-tabs">
    <li class="active"><a href="${ctx}/sys/shoppingOrderProduct/reserveShoppingProduct"> 购物订单管理</a></li>
</ul>
<form:form id="searchForm" modelAttribute="tbOrder" action="${ctx}/sys/shoppingOrderProduct/reserveShoppingProduct"
           method="post" class="breadcrumb form-search">
    <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
    <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
    <label>店铺名称：</label><form:input path="userName" htmlEscape="false" maxlength="50" class="input-medium"/>
    &nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
</form:form>
<table id="contentTable" class="table table-striped table-bordered table-condensed">
    <thead>
    <tr>
        <th>店铺名称</th>
        <th>订单号</th>
        <th>订单状态</th>
        <th>订单时间</th>
        <th>订单总额</th>
        <th>订单联系人</th>
        <th>联系电话</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>
    <c:forEach items="${reservePage.list}" var="tbOrder">
            <tr>
                <td>${tbOrder.userName}</td>
                <td>${tbOrder.orderNo}</td>
                <td>
                    <c:if test="${tbOrder.orderState eq '0'}">
                        未确定
                    </c:if>
                    <c:if test="${tbOrder.orderState eq '1'}">
                        已确认
                    </c:if>
                    <c:if test="${tbOrder.orderState eq '2'}">
                        已取消
                    </c:if>
                    <c:if test="${tbOrder.orderState eq '3'}">
                        已关闭
                    </c:if>
                </td>
                <td>${tbOrder.orderTime}</td>
                <td>${tbOrder.orderAmount}</td>
                <td>${tbOrder.contactName}</td>
                <td>${tbOrder.contactMobile}</td>
                <td>
                    <a href="${ctx}/sys/orderProduct/reserveQueryOrder/${tbOrder.id}">预定明细</a>
                </td>
            </tr>
    </c:forEach>
    </tbody>
</table>
<div class="pagination">${reservePage}</div>
</body>
</html>
